angular.module('app').controller('myCon', ($scope, $resource, FileUploader) => {
    const uploader = $scope.uploader = new FileUploader({
        url: '/fileUploader',
        withCredentials: true
    });
    uploader.onSuccessItem = (fileItem, response, status, headers) => console.info('成功!');
    uploader.onErrorItem = (fileItem, response, status, headers) => console.error('失败!');
    


    $scope.myFile;

    
    $scope.ch = () => {
        console.log($scope.myFile);
    }
    var Person = $resource('http://localhost:8081/person/:name', {
        name: '@name'
    });
    $scope.find = () => {
        Person.get({
                name: $scope.uname
            })
            .$promise.then(person => {
                console.log(person);
                if (person.name != undefined) {
                    $scope.isShow = true;
                    $scope.tableData = person;
                }
            });
    };
});